Skip to content

Fix build errors with LLVM 23 - #13673

Merged
masaori335 merged 2 commits into
apache:masterfrom
masaori335:llvm-23
Sep 16, 2026
Merged

masaori335 merged 2 commits into
apache:masterfrom
masaori335:llvm-23

Conversation

@masaori335

Copy link
Copy Markdown
Contributor

I faced some compile errors with LLVM-23.1 on macOS.

  1. libc++ 23 no longer provides transitively headers
  2. -Wunused-template and -Wunused-but-set-global are enabled by default

LLVM 23 flips libc++'s transitive-include compatibility block from
opt-out to opt-in (_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23), so
<algorithm> and <string> no longer drag in <iterator> and <cstdlib>.
Include them where the symbols are actually used rather than relying
on the old default.
The const char (&)[N] overload of matches_bracketed_int_range can
never be selected: RecordElement::regex is a const char *, so the
string_view overload always wins. RecMessageRegisterRecvCb has had no
callers since traffic_manager was removed, leaving its cookie global
set but never read.
@masaori335 masaori335 added this to the 11.0.0 milestone Sep 14, 2026
@masaori335 masaori335 self-assigned this Sep 14, 2026
Copilot AI lite review requested due to automatic review settings September 14, 2026 01:59
@masaori335 masaori335 added the Build work related to build configuration or environment label Sep 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues remain, and the changes address LLVM 23 compatibility warnings and errors.

Pull request overview

Fixes LLVM 23.1/macOS build errors by adding required standard-library headers and removing unused code.

Changes:

  • Adds direct <algorithm>, <iterator>, and <cstdlib> includes.
  • Removes unused record-message callbacks and template code.
File summaries
File Summary
src/traffic_cache_tool/CacheTool.cc Adds <algorithm>.
src/records/RecordsConfig.cc Removes unused template overload.
src/records/RecMessage.cc Removes unused callback state and function.
src/records/P_RecMessage.h Removes callback declaration.
src/records/P_RecDefs.h Removes callback type alias.
src/mgmt/config/ReloadCoordinator.cc Adds <iterator>.
plugins/multiplexer/ats-multiplexer.cc Adds <iterator>.
plugins/experimental/inliner/png.h Adds <iterator>.
plugins/experimental/inliner/cache-handler.h Adds <iterator>.
plugins/experimental/cookie_remap/cookiejar.cc Adds <cstdlib>.
lib/swoc/unit_tests/test_TextView.cc Adds <iterator>.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@masaori335
masaori335 merged commit 5a23990 into apache:master Sep 16, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this to For v10.2.1 in ATS v10.2.x Sep 16, 2026
cmcfarlen pushed a commit that referenced this pull request Sep 21, 2026
* Add includes libc++ 23 no longer provides transitively

LLVM 23 flips libc++'s transitive-include compatibility block from
opt-out to opt-in (_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23), so
<algorithm> and <string> no longer drag in <iterator> and <cstdlib>.
Include them where the symbols are actually used rather than relying
on the old default.

* Drop dead records code flagged by -Wunused-*

The const char (&)[N] overload of matches_bracketed_int_range can
never be selected: RecordElement::regex is a const char *, so the
string_view overload always wins. RecMessageRegisterRecvCb has had no
callers since traffic_manager was removed, leaving its cookie global
set but never read.

(cherry picked from commit 5a23990)
@cmcfarlen cmcfarlen moved this from For v10.2.1 to Picked v10.2.1 in ATS v10.2.x Sep 21, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.1 Sep 21, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picked to the 10.2.x branch as 2a520fa for the 10.2.1 release.

@bryancall bryancall added the Bug label Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Build work related to build configuration or environment

Projects

Status: Picked v10.2.1

Development

Successfully merging this pull request may close these issues.

5 participants